//使用mock 模拟定义接口
import Mock from 'mockjs'
import loginMock from './login.js'
import pressMock from './press';
import barMock from './bar';
import pieMock from './pie';
import userMock from './user';

Mock.setup({
    timeout: 400 //表示 400 毫秒 
})

//1. 登陆接口
Mock.mock('/login', 'post', loginMock.loginMock)

//2 根据不同角色返回不同菜单接口

Mock.mock('/getpress', 'post', pressMock.pressMock),

//3.柱形图接口
Mock.mock('/getBarData', 'get', barMock.barData)
//4.饼形图接口
Mock.mock('/getPieData', 'get', pieMock.pieData)

//用户列表数据
Mock.mock('/getUserList', 'post', userMock.userMock)

//删除接口
Mock.mock(new RegExp('/deleteUser.*'), 'get', userMock.deleteMock)

//编辑接口  
Mock.mock('/editUser', 'post', userMock.editMock)

//增加的接口
Mock.mock('/addUser', 'post', userMock.addMock)